<?php foreach ($elementsForDisplay as $setName => $setElements): ?>
<div class="element-set">
	<table class="meta-table">
		<?php if ($setName!='Dublin Core'): // Métadonnées du type de contenu ?>
		<tr>
			<td class="meta-title">Type de document</td>
			<td class="meta-value"><?php echo metadata('item', 'item_type_name'); ?></td>
		</tr>
		<?php endif; ?>
		<?php foreach ($setElements as $elementName => $elementInfo): ?>
			<?php // pour les URL et les relation, insertion d'un lien
			if (preg_match('/URL/',$elementName) or preg_match('/Relation/',$elementName)):  ?>
				<tr>
					<td class="meta-title"><?php echo html_escape(__($elementName)); ?></td>
					<td class="meta-value">
				  <?php foreach ($elementInfo['texts'] as $text): ?>
				  		<?php
				  		if (preg_match('/http:\/\/fr.wikipedia.org\/wiki/', $text)) $classTootipAjax=' class="tooltipajax"';
				  		else $classTootipAjax='';
				  		?>
				      	<a href="<?php echo $text;?>" target="_blank"<?php echo $classTootipAjax ?>><?php echo $text;?></a>
				  <?php endforeach; ?>
					</td>
				</tr>
			<?php else : // autrement ?>
				<tr>
					<td class="meta-title"><?php echo html_escape(__($elementName)); ?></td>
					<td class="meta-value">
				  <?php foreach ($elementInfo['texts'] as $text): ?>
				      <div class="element-text"><?php echo $text; ?></div>
				  <?php endforeach; ?>
					</td>
				</tr>
			<?php endif; ?>
		<?php endforeach; ?>
	</table>
</div>
<?php endforeach;
